﻿using Microsoft.AspNetCore.Builder;
using Prometheus;
using Prometheus.HttpMetrics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YDT_ResourceMonitor.Monitors
{
    /// <summary>
    /// 分布式资源监控封装
    /// </summary>
    public static class PrometheusDistributedResourceMointorIApplicationBuilderExtensions
    {
        public static IApplicationBuilder UseDistributedResourceMointor(this IApplicationBuilder app, HttpMiddlewareExporterOptions? options = null)
        {
            // 6、收集商品微服务资源
            app.UseMetricServer();
            app.UseHttpMetrics();

            return app;
        }
    }
}
